<?php
/**
 * JoiGallery - image gallery component for Joostina
 *
 * Добавление фотографии
 *
 * @version 1.0 alpha 3
 * @package JoiGallery
 * @subpackage	AdminView
 * @filename photo_add.php
 * @author JoostinaTeam
 * @copyright (C) 2008-2009 Joostina Team
 * @license see license.txt
 *
 **/
 
defined('_VALID_MOS') or die();

	  mosCommonHTML::loadOverlib();
	  ?>
	  
	  <script language="javascript" type="text/javascript">
		function submitbutton(pressbutton, section) {
			var form = document.adminForm;
			if (pressbutton == 'cancel') {
				submitform( pressbutton );
				return;
			}

			<?php getEditorContents( 'editor1', 'description' ) ; ?>
			submitform(pressbutton);
		}
		</script>
	  <form action="index2.php" method="post" name="adminForm" enctype="multipart/form-data">
		<table class="adminheading">
		<tr>
			<th class="mediamanager"><?php echo _C_JOIGALLERY_PHOTO_UP_PHOTO ?></th>
		</tr>
		</table>
		<br />
		<div align="left" class="small"><?php echo _C_JOIGALLERY_PHOTO_UP_LIMIT ?> <?php echo ini_get('upload_max_filesize'); ?></div>
		<table class="adminlist" width="100%">
		<tr>
		  <td width="150"><?php echo _C_JOIGALLERY_PHOTO_PLACE_CAT ?></td>
		  <td><?php echo $lists['cid']; ?></td>
		</tr>
		<tr>
		  <td><?php echo _C_JOIGALLERY_PHOTO_SORT ?></td>
		  <td><?php echo $lists['sort']; ?></td>
		</tr>
		<tr>
		  <td><?php echo _C_JOIGALLERY_PHOTO_DEFAULT_PUB ?></td>
		  <td><?php echo mosHTML::yesnoRadioList('state', '', 1); ?></td>
		</tr>
		<tr>
		  <td><?php echo _C_JOIGALLERY_PHOTO_NAME ?> <?php echo mosToolTip(_C_JOIGALLERY_JS_EMPTY, 'Help'); ?></td>
		  <td><input type="text" name="name" class="text_area" size="30" value="" /></td>
		</tr>
		<tr valign="top">
		  <td><?php echo _C_JOIGALLERY_CAT_DESCR ?></td>
		  <td><?php 
		    // parameters : areaname, content, hidden field, width, height, rows, cols
        editorArea( 'editor1',  '' , 'description', '100%;', '300', '60', '20' ) ; 
        ?>
		  </td>
		</tr>
		</table>
		<br />
		<div align="left">
		<?php echo _C_JOIGALLERY_PHOTO_UP_WAYS ?>
		<table class="adminlist" width="100%">
		<tr>
		  <th class="title" colspan="2"><?php echo _C_JOIGALLERY_PHOTO_UP_WAYS_ONE ?></th>
		</tr>
		<tr>
		  <td width="150"><?php echo _C_JOIGALLERY_PHOTO_FILE ?></td>
		  <td><input type="file" name="photo" class="text_area" size="30" value="" /></td>
		</tr>
		</table>
		<br />
		<table class="adminlist" width="100%">
		<tr>
		  <th class="title" colspan="2"><?php echo _C_JOIGALLERY_PHOTO_UP_WAYS_TWO ?></th>
		</tr>
		<tr>
		  <td width="150"><?php echo _C_JOIGALLERY_PHOTO_FILE ?></td>
		  <td><input type="file" name="zip" class="text_area" size="30" value="" /></td>
		</tr>
		</table>
		<br />
		<table class="adminlist" width="100%">
		<tr>
		  <th class="title" colspan="2"><?php echo _C_JOIGALLERY_PHOTO_UP_WAYS_THREE ?></th>
		</tr>
		<tr>
		  <td width="150"><?php echo _C_JOIGALLERY_PHOTO_DIRECTORY ?></td>
		  <td><input type="name" name="dir" class="text_area" size="45" value="<?php echo $mainframe->getCfg('absolute_path'); ?>" /></td>
		</tr>
		</table>
		</div>
		<input type="hidden" name="option" value="<?php echo $option; ?>" />
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="act" value="photos" />
		<input type="hidden" name="boxchecked" value="0" />
		<input type="hidden" name="hidemainmenu" value="0" />
		</form>